1 PRINT "CRAP GAME"
2 PRINT "WITH THE COMPUTER AS YOUR OPPONENT. THE RULES ARE SIMPLE:"
3 PRINT "   *A 7 OR 11 ON THE FIRST ROLL WINS"
4 PRINT "   *A 2, 3, OR 12 ON THE FIRST ROLL LOSES"
5 PRINT
6 PRINT "ANY OTHER NUMBER ROLLED BECOMES YOUR 'POINT' . YOU CONTINUE"
7 PRINT "TO ROLL...IF YOU GET YOUR POINT, YOU WIN. IF YOU ROLL A 7,"
8 PRINT "YOU LOSE. THE DICE CHANGE HANDS WHEN THIS HAPPENS."
9 PRINT
10 PRINT
11 PRINT "WHAT NUMBER BETWEEN 1 AND 711 IS LUCKY FOR YOU TODAY";
12 INPUT N
13 FOR I = 1 TO N
14 LET X =RND(I)
15 NEXT I
16 LET Z=5*INT(10+11*RND(I))
17 PRINT "SPLENDID.....YOU ARE GIVEN ";Z;"DOLLARS TO PLAY WITH."
18 PRINT
19 PRINT
20 REM IF N IS EVEN 'YOU' ROLL FIRST, IF N IS ODD 'I' ROLL FIRST.
21 IF N-2*INT(N/2)=0 THEN 27
22 LET W=-1
23 PRINT "I'LL ROLL FIRST....."
24 PRINT
25 PRINT
26 GOTO 31
27 LET W=1
28 PRINT "YOU ROLL FIRST....."
29 PRINT
30 PRINT
31 LET Q=0
32 PRINT "HOW MUCH DO YOU BET ($$) ";
33 INPUT B
34 PRINT "OK....."
35 PRINT
36 IF B=INT(B) THEN 40
37 PRINT
38 PRINT "NO COINS PERMITTED..JUST BILLS, PLEASE!"
39 GOTO 32
40 IF B=0 THEN 108
41 IF B<Z+1 THEN 44
42 PRINT "DON'T TRY TO BET MORE THAN YOU HAVE, PLEASE!!"
43 GOTO 32
44 LET D1=INT(6*RND(1)+1)
45 LET D2=INT(6*RND(2)+1)
46 LET Q=Q+1
47 LET S=D1+D2
48 IF W>0 THEN 51
49 PRINT "  I ROLL";D1;"AND";D2;
50 GOTO 52
51 PRINT "YOU ROLL";D1;"AND";D2;
52 IF Q<>1 THEN 84
53 IF (S-2)*(S-3)*(S-12)=0 THEN 62
54 IF (S-7)*(S-11)=0 THEN 69
55 IF W>0 THEN 58
56 PRINT "SO MY POINT IS";S;
57 GOTO 59
58 PRINT "SO YOUR POINT IS";S;
59 PRINT ".....LET'S ROLL 'EM AGAIN....."
60 LET P=S
61 GOTO 44
62 PRINT "AND CRAP OUT..."
63 LET C=1
64 IF W>0 THEN 67
65 LET Z=Z+B
66 GOTO 75
67 LET Z=Z-B
68 GOTO 75
69 PRINT "AND PASS....."
70 LET C=1
71 IF W>0 THEN 74
72 LET Z=Z-B
73 GOTO 75
74 LET Z=Z+B
75 PRINT
76 IF Z<1 THEN 104
77 PRINT "YOU NOW HAVE ";Z;"DOLLARS LEFT....."
78 IF C>0 THEN 81
79 PRINT "CHANGE DICE NOW....."
80 PRINT
81 LET W=W*C
82 LET Q=0
83 GOTO 32
84 IF S<>7 THEN 92
85 PRINT "AND LOSE....."
86 LET C=-1
87 IF W>0 THEN 90
88 LET Z=Z+B
89 GOTO 75
90 LET Z=Z-B
91 GOTO 75
92 IF S=P THEN 95
93 PRINT "...ROLL AGAIN....."
94 GOTO 44
95 IF W>0 THEN 100
96 PRINT "AND MAKE MY POINT....."
97 LET C=1
98 LET Z=Z-B
99 GOTO 75
100 PRINT "AND MAKE YOUR POINT....."
101 LET C=1
102 LET Z=Z+B
103 GOTO 75
104 PRINT
105 PRINT "YOU HAVE RUN OUT OF MONEY....SORRY ABOUT THAT....."
106 PRINT "THANKS FOR THE GAME.....BETTER LUCK NEXT TIME, PARDNER!"
107 GOTO 110
108 PRINT "THANKS FOR THE GAME.....AND CONGRATULATIONS"
109 PRINT "FOR BEING ABLE TO QUIT WHILE YOU WERE AHEAD."
110 END
